Prose feedback in information access system

ABSTRACT

A method of generating prose in response to a query includes generating a text frame from the query and processing the text frame in conjunction with grammar rules to produce a prose rendition of the query.

BACKGROUND

[0001] This invention relates to software that interfaces to informationaccess platforms.

[0002] A search engine is a software program used for search andretrieval in database systems. The search engine often determines thesearching capabilities available to a user. A web search engine is oftenan interactive tool to help people locate information available over theworld wide web (WWW). Web search engines are actually databases thatcontain references to thousands of resources. There are many searchengines available on the web, from companies such as Alta Vista, Yahoo,Northern Light and Lycos.

SUMMARY

[0003] In an aspect, the invention features a method of generating prosein response to a query including generating a text frame from the queryand processing the text frame in conjunction with grammar rules toproduce a prose rendition of the query. The text frame includes a datastructure having rows, each of the rows having a key, the keyidentifying information in each of the rows. The data structure mayinclude other data structures. Grammar rules may include naturallanguage rules and English. Generating the text frame includesencapsulating the processed text frame in a markup language. The markuplanguage may be XML and HTML. The text frame may be matched to thegrammar rules.

BRIEF DESCRIPTION OF THE DRAWINGS

[0004] The foregoing features and other aspects of the invention will bedescribed further in detail by the accompanying drawings, in which:

[0005]FIG. 1 is a block diagram of a network configuration.

[0006]FIG. 1A is a flow diagram of a search process.

[0007]FIG. 2 is a flow diagram of an information access process.

[0008]FIG. 3 is a flow diagram of a meaning resolution process used bythe information access process of FIG. 2.

[0009]FIG. 4 is a block diagram of an information interface.

[0010]FIG. 5 is a flow diagram of a reduction and summarization processused by the information access process of FIG. 2.

[0011]FIG. 6 is a flow diagram of a prose process used by theinformation access process of FIG. 2.

[0012]FIG. 7 is flow diagram of a bootstrap process used by theinformation access process of FIG. 2.

[0013]FIG. 8 is flow diagram of a database aliasing process used by theinformation access process of FIG. 2.

[0014]FIG. 9 is flow diagram of a database aliasing file generationprocess used by the information access process of FIG. 2.

[0015]FIG. 10 is a flow diagram of a query expansion process used by theinformation access process of FIG. 2.

DETAILED DESCRITPION

[0016] Referring to FIG. 1, a network configuration 2 for executing aninformation access process includes a user computer 4 connected via alink 6 to an Internet 8. The link 6 may be a telephone line or someother connection to the Internet 8, such as a high speed T1 line. Thenetwork configuration 2 further includes a link 10 from the Internet 8to a client system 12. The client system 12 is a computer system havingat least a central processing unit (CPU) 14, a memory (MEM) 16, and alink 18 connected to a storage device 20. The storage device 20 includesa database 21, which contains information that a user may query. Theclient system 12 is also shown to include a link 22 connecting theclient system 12 to a server 24. The server 24 includes at least a CPU25 and a memory 26. A plug-in 27 is shown resident in the memory 26 ofthe server 24. The plug-in 27 is an application program module thatallows a web site code running on the client system 12 to execute aninformation access process residing in the memory 26 of the server 24.The plug-in 27 allows the web site application to incorporate resultsreturned from the information access process while it is generating HTMLfor display to the user's browser (not shown). HTML refers to HypertextMarkup Language and is the set of “markup” symbols or codes inserted ina file intended for display on a World Wide Web browser. The markuptells the Web browser how to display a Web page's words and images forthe user. The individual markup codes are referred to as elements (alsoreferred to as tags). As is shown, the server 24 shares access to thedatabase 21 on the storage device 20 via a link 28. Other networkconfigurations are possible. For example, a particular networkconfiguration includes the server 24 maintaining a local copy of thedatabase 21. Another network configuration includes the Internet 8connecting the client system 12 to the server 24.

[0017] Referring to FIG. 1A, a search process 30 residing on a computersystem includes a user using a web-browser on a computer connecting 32to the Internet and accessing a client system. Other embodiments includea direct connection from the user computer to the client system. Theclient system displays 33 a page on the web browser of the user and theuser inputs 34 a query in a query input box of the displayed page. Thequery is sent 35 to an information access process residing on a serverfor processing. The information access process processes 36 the queryand sends the results to the client system. The results are thendisplayed 37 to the user.

[0018] Referring to FIG. 2, an information access process 40 on acomputer system receives 42 a query by a user. The query may be a wordor multiple words, sentence fragments, a complete sentence, and maycontain punctuation. The query is normalized 44 as pretext.Normalization includes checking the text for spelling and properseparation. A language lexicon is also consulted during normalization.The language lexicon specifies a large list of words along with theirnormalized forms. The normalized forms typically include word stemsonly, that Is, the suffixes are removed from the words. For example, theword “computers” would have the normalized form “computer” with theplural suffix removed.

[0019] The normalized text is parsed 46, converting the normalized textinto fragments adapted for further processing. Annotating words aspunitive keys and values, according to a feature lexicon, producesfragments. The feature lexicon is a vocabulary, or book containing analphabetical arrangement of the words in a language or of a considerablenumber of them, with the definition of each; a dictionary. For example,the feature lexicon may specify that the term “Compaq” is a potentialvalue and that “CPU speed” is a potential key. Multiple annotations arepossible.

[0020] The fragments are inflated 48 by the context in which the textinputted by the user arrived, e.g., a previous query, if any, that wasinputted and/or a content of a web page in which the user text wasentered. The inflation is preformed by selectively merging 50 stateinformation provided by a session service with a meaning representationfor the current query. The selective merging is configurable based onrules that specify which pieces of state information from the sessionservice should be merged into the current meaning representation andwhich pieces should be overridden or masked by the current meaningrepresentation.

[0021] The session service stores all of the “conversations” that occurat any given moment during all of the user's session. State informationis stored in the session service providing a method of balancing loadwith additional computer configurations. Load balancing may send eachuser query to a different configuration of the computer system. However,since query processing requires state information, storage of stationinformation on the computer system will not be compatible with loadbalancing. Hence, use of the session service provides easy expansion bythe addition of computer systems, with load sharing among the systems tosupport more users.

[0022] The state information includes user specified constraints thatwere used in a previous query, along with a list of features displayedby the process 40 and the web page presented by the main server. Thestate information may optionally include a result set, either in itsentirety or in condensed form, from the previous query to speed upsubsequent processing in context. The session service may reside in onecomputer system, or include multiple computer systems. When multiplecomputer systems are employed, the state information may be assigned toa single computer system or replicated across more than one computersystem.

[0023] Referring now to FIG. 3, the inflated sentence fragments areconverted 52 into meaning representation by making multiple passesthrough a meaning resolution process 70. The meaning resolution process70 determines 72 if there is a valid interpretation within the textquery of a key-value grouping of the fragment. If there is a validinterpretation, the key value grouping is used 74. For example, if theinput text, i.e., inflated sentence fragment, contains the string “500MHz CPU speed,” which may be parsed into two fragments, “500 MHz” valueand “CPU speed” key, then there is a valid grouping of key=“CPU speed”and value=“500 MHz”.

[0024] If no valid interpretation exists, a determination 76 is made onwhether the main database contains a valid interpretation. If there is avalid interpretation in the main database, the key value group is used74. If no valid interpretation is found in the main database, theprocess 70 determines 78 whether previous index fields have a highconfidence of uniquely containing the fragment. If so, the key valuegrouping is used 74. If not, other information sources are searched 80and a valid key value group generated 82. If a high confidence and validpunitive key is determined through one of the information sourcesconsulted, then the grouping of the key and value form an atomic elementare used 74. To make it possible to override false interpretations, aconfiguration of grammar can also specify manual groupings of keys andvalues that take precedence over the meaning resolution process 70.

[0025] Referring again to FIG. 2, meaning resolved fragments,representing the user query, are answered 54. In providing an answer oranswers, logic may decide whether or not to go out to the main database,whether or not to do a simple key word search, or whether or not to dodirect navigation, and so forth. Answer or answers are summarized andorganized 56. Summarization and organization may involve intelligentdiscarding of excessive and unneeded details to provide more meaningfulresults in response to the user query.

[0026] When a user asks a question, i.e., submits a query, there isusually no way to predict how many appropriate results will be found.The process 40 attempts to present the user with no more informationthan can be reasonably absorbed. This is often dictated by the amount ofspace available on the users displayed web page.

[0027] Prose is generated 58. The prose represents the specific querythe user initially asked, followed by organized and summarized resultsto the user query. The prose and organized answers are outputted 60 tothe user for display. Output to the user may involve producing HTML ofthe prose and organized answers and/or XML for transmission of theorganized answers and dynamic prose back to the main server for HTMLrendering. XML refers to extensive markup language, a flexible way toprovide common information formats and share both the format and thedata on the word wide web, intranets, and elsewhere. Any individual orgroup of individuals or companies that wants to share information in aconsistent way can use XML.

[0028] Referring to FIG. 4, the control logic of process 40 includes aninformation interface 80. The purpose of the information interface 80 isto isolate the control logic from the details of any given web site onthe main server or other servers, e.g., how they store particularinformation. For example, different web sites will name thingsdifferently and/or store things differently. The information interface80 provides a standard format for both receiving information from, andsending information to, the control logic of process 40, and normalizesthe interface to various information sources. The information interface80 includes an information retrieval process 82, a database (db)aliasing process 84, a URL driver process 86 and a storage process 88.

[0029] An exemplary illustration of a standard format used by theinformation interface 80 is shown as follows: :features {features         :_ {feature          :key ‘product price’}          :_ {feature        :key ‘product min age’}         :_ {feature         :key‘product max age’}         :_ {feature         :key ‘product name’}        :_ {feature         :key ‘sku’}} :constraints {or          :_{and              :_ {feature                  :key ‘productdescription’                :value {or                      :_ {value                         :eq     ‘fire trucks’                 :kwid     ‘fire trucks’}}}}}       :sort features             :_ {feature                :key ‘product price’}             :_ {feature                :key ‘product min age’}             :_ {feature                :key ‘product max age’}             :_ {feature                :key ‘product name’}             :_ {feature                :key ‘sku’}}}

[0030] The information interface 80 handles and formats both “hard” and“soft” searches. A hard search typically involves a very specific queryfor information, while a soft search typically involves a very generalquery for information. For example, a hard search may be for the priceto be less than $500 where price is a known column in the database andcontains numeric values. The IR engine to include occurrences of “firetruck” within textual descriptions may interpret a soft search for “fireengine”.

[0031] The URL driver process 86 maintains a URL configuration file. TheURL configuration file stores every detail of a web site in compressedformat. The compression collapses a set of web pages with the same basictemplate into one entry in the URL configuration file. By way ofexample, the following is a sample portion of a URL configuration fileentry:     /newcar/$Manufacturer/$Year/$Model/       keys: overview    /newcar/$Manufacturer/$Year/$Model/safetyandreliability. asp      keys: safety reliability

[0032] The db aliasing process 84 handles multiple words that refer tothe same information. For example, the db aliasing process 84 willequate “laptop” and “notebook” computers and “pc” and “personalcomputer.”

[0033] The URL driver process 86 includes bi-directional search logicfor interacting with the URL configuration file. In a “forward” searchdirection, a specific query is received and the search logic searchesthe URL configuration file for a best match or matches and assigns ascore to the match or matches, the score representing a relative degreeof success in the match. The score is determined by the number of keysin the URL configuration entry that match the keys desired by thecurrent meaning representation of the query. More matching keys willresult in a higher score.

[0034] In a “reverse” direction, the search logic contained within theURL driver process 86 responds to a query by looking at the contents ofthe web page in which the user is currently viewing and finds the answerto the new user query in combination with the features of the web pagewhich the user is viewing, along with a score of the match or matches.Thus, the search logic of the URL driver process 86 looks at the currentweb page and connects current web page content with current userqueries, thus deriving contacts from the previous line of questioning.

[0035] As described with reference to FIG. 2, the information accessprocess 40 contains control logic to provide answers to a user's query.The answers are summarized and organized. Typically, the results of aspecific database search, i.e., user query, will identify many rows ofresults. These rows will often result in more than one web page ofdisplayed results if the total result is taken into account. Theinformation access process 40 reduces the number of rows of answers inan iterative fashion.

[0036] Referring to FIG. 5, a reduction and summarization process 110determines 112 a count of the total number of results obtained fromsearching the main database. The reduction and summarization process 110determines 114 the amount of available space on the web page for displayof the answers. A determination 116 is made as to whether the number ofresults exceeds the available space on the web page. If the number ofresults does not exceed the available space on the web page the resultsare displayed 118 on the web page. If the number of results exceedsavailable space on the web page, a row of results is eliminated 120 toproduce a subset of the overall results. The number of results containedwithin the subset is determined 122. The determination 116 of whetherthe number of results contained within the subset exceeds availablespace on the web page is executed. The reduction and summarizationprocess 110 continues until the number of results does not exceedavailable display space on the web page.

[0037] When a reduction of results is made, the reduction andsummarization process 110 has no prior knowledge of how it will affectthe total count, i.e., how many rows of data will be eliminated.Reductions may reduce the overall result count, i.e., rows of resultdata, in different ways. Before any reduction and summarization isdisplayed in tabular form to the user, the resultant data is placed in ahierarchical tree structure based on its taxonomy. Some searches willgenerate balanced trees, while others will generate unbalanced trees.Further, some trees will need to be combined with other trees. To reducethe resultant data, the reduction and summarization process 110 looks atthe lowest members of the tree, i.e., the leaves, and first eliminatesthis resultant data. This results in eliminating one or more rows ofdata and the overall count of resultant data. If the overall count isstill too large, the reduction and summarization process 110 repeatsitself and eliminates another set of leaves.

[0038] Eliminating rows (i.e., leaves) to generate a reduced result setof answers allows the reduction and summarization process 110 to reduceidentical information but maintain characterization under identicalinformation in the hierarchical tree structure. The identical rowsrepresenting identical information can be collapsed. For example, if theeliminated row in the reduced result set contains specific priceinformation, collapsing the eliminated row may generate price rangesinstead of individual prices.

[0039] As mentioned previously, some results may generate multipletrees. In a particular embodiment, to reduce the overall amount ofresultant data in the result set, information is eliminated where thegreatest number of leaves is present across multiple trees.

[0040] Referring again to FIG. 2, it should be noted that sometimes theinformation access process 40 will provide no summarization and/orreduction of results, e.g., the user asks for no summarization or theresults are very small.

[0041] Organization of resultant data generally puts the answers to theuser's query into a hierarchy, like a table, for example, and the tablemay include links to other web pages for display to the user. Links,i.e., addresses associated with each row of the displayed results, areencoded within each element of the hierarchical tree structure so thatthe user may navigate to a specific web page by clicking on any of thelinks of the resultant rows of displayed data. The encoding is done byincluding a reference to a specific session know by the session servicealong with the address to an element in the table of results displayedduring the specific session. State information provided by the sessionservice can uniquely regenerate the table of results. The address is aspecification of the headings in the table of results.

[0042] For example, if an element in the hierarchical structure is undera subheading “3” which is under a major heading “E,” the address wouldspecify that the major heading is “E” and that the subheading is “3.”Response planning may also include navigation to a web page in which theuser will find a suitable answer to their query.

[0043] As previously described, prose is generated and added to theresults.

[0044] Referring to FIG. 6, a prose process 140 includes receiving 142the normalized text query. The normalized text query is converted 144 toprose and the prose displayed 146 to the user in conjunction with theresults of the user query.

[0045] The prose process 140 receives the normalized text query as atext frame. The text frame is a recursive data structure containing oneor more rows of information, each having a key that identifies theinformation. When the text frame is passed to the prose process 140 itis processed in conjunction with a prose configuration file. The proseconfiguration file contains a set of rules that are applied recursivelyto the text frame. These rules include grammar having variablescontained within. The values of the variables come from the text frame,so when combined with the grammar, prose is generated. For example, onerule may be “there are $n products with $product.” The variables $n and$product are assigned values from an analysis of the text frame. Thetext frame may indicate $n=30 and $product=leather. Thus, the prose thatresults in being displayed to the user is “there are 30 products withleather.”

[0046] More than one rule in the prose configuration file may match thetext frame. In such a case, prose process 140 will recursively build anappropriate prose output. In addition, if two rules in the proseconfiguration file match identically, the prose process 140 mayarbitrarily select one of the two rules, but the database can beweighted to favor one rule over another. In some cases, default rulesmay apply. In addition, some applications may skip over keys and may userules more than once.

[0047] The prose configuration file also contains standard functions,such as a function to capitalize all the letters in a title. Otherfunctions contained within the prose configuration may pass arguments.

[0048] The information access process 40 (of FIG. 2) interfaces with anumber of configuration files in addition to the prose configurationfile. These configuration files aid the information access process 40 inprocessing queries with the most current data contained in the mainserver database. For example, the information access process 40 has abootstrapping ability to manage changes to a web page of the main serverand to the main server database. This bootstrapping ability is needed sothat when the main server database changes occur, the information accessprocess 40 utilizes the most current files.

[0049] The information access process 40 also includes a number of toolsthat analyze the main server database and build initial versions of allof the configuration files, like the prose configuration file; this isgenerally referred to as bootstrapping, as described above.Bootstrapping gives the information access process 40 “genuine”knowledge of how grammar rules for items searching looks like, specificto the main server database being analyzed.

[0050] Referring to FIG. 7, a bootstrap process 170 extracts 172 alltext corresponding to keys and values from the main server database. Theextracted text is placed 174 into a feature lexicon. A language lexiconis updated 176 using a general stemming process. Grammar files areaugmented 178 from the extracted keys and values. Generic grammar filesand previously built application-specific grammar files are consulted180 for rule patterns, that are expanded 182 with the newly extractedkeys and values to comprise a full set of automatically generatedgrammar files.

[0051] For example, if an application-specific grammar file specifiesthat “Macintosh” and “Mac” parse to the same value, any extracted valuescontaining “Macintosh” or “Mac” will be automatically convert into arule containing both “Macintosh” and “Mac.” The structuring of the setof grammar files into generic, application-specific and site-specificfiles allows for maximum automatic generation of new grammar files fromthe main server database. The bootstrapping process 170 can build thelogic and prose configuration files provided that a system developer hasinputted information about the hierarchy of products covered in the mainserver database.

[0052] The hierarchy for a books database, for example, may include atop-level division into “fiction” and “nonfiction.” Within fiction, thevarious literary genres might form the next level or subdivision, and soforth. With knowledge of this hierarchy, the bootstrapping process 170configures the logic files through link linguistic concepts relating toentries in the hierarchy with products in the main server database, sothat the logic is configured to recognize, for example, that “fiction”refers to all fiction books in the books database. The logicconfiguration files are also automatically configured by default, andsummarization and organization of the results uses all levels of thehierarchy. The prose configuration files are automatically generatedwith rules specifying that an output including, for example, mysterynovels, should include the category term “mystery novels” fromhierarchy. The bootstrapping process 170 may also “spider” 184 a mainserver database so as to build a language lexicon of the site, e.g.,words of interest at the site. This helps building robust configurationfiles. Spidering refers to the process of having a program automaticallydownload one or more web pages, further downloading additional pagesreferenced in the first set of pages, and repeating this cycle until nofurther pages are referenced or until the control specification dictatesthat the further pages should now be downloaded. Once downloaded,further processing is typically performed on the pages. Specifically,the further processing here involves extracting terms appearing on thepage to build a lexicon.

[0053] When the bootstrapping process 170 executes after originalconfiguration files have been generated, the original configurationfiles are compared with the current configuration files and changesadded incrementally as updates to the original configuration files.

[0054] Referring again to FIG. 3, the information interface 80 includesthe database aliasing process 88. The database aliasing process 88provides a method to infer results when no direct match occurs.Referring to FIG. 8, a database (db) aliasing process 200 includesgenerating 202 and aliasing the file, and applying 204 the aliasing fileto a user query. The automatic generation of the database aliasing filereduces the amount of initial development effort as well as the amountof ongoing maintenance when the main server database content changes.

[0055] Referring to FIG. 9, a database aliasing file generating process220 includes extracting 222 names from the main server database. Theextracted names are normalized 224. The normalized names are parsed 226.The language lexicon is applied 28 to the normalized parsed names. Adetermination 230 is made on whether multiple normalized names map toany single concept. If so, alias entries are stored 232 in the databasealiasing file. In this manner, the grammar for the parser can beleveraged to produce the database aliasing file. This reduces the needfor the system developer to input synonym information in multipleconfiguration files and also allows imprecise aliases, which areproperly understood by the parser, to be discovered without any directmanual entry.

[0056] The db aliasing file, like many of the configuration files, isgenerated automatically, as described with reference to FIG. 9. It canalso be manually updated when the context of the database underinvestigation changes. The database aliasing file is loaded and appliedin such a way as to shield its operations from the information interface80 of FIG. 3.

[0057] In a particular embodiment, the application of the db aliasingfile to a query can be used in two directions. More specifically, in aforward direction, when a user query is received, applying the databasealiasing file to the user query and resolving variations of spelling,capitalization, and abbreviations, normalized the user query, so that anormalize query can be used to search the main server database. In areverse direction, if more than one alias is found, the search resultswill normalize on a single name for one item rather than all possiblealiases found in the main server database file.

[0058] Referring again to FIG. 4, the information interface 80 includesthe information retrieval (IR) process 82. The information retrievalprocess 82 purpose is to take a collection of documents on a main serverdatabase containing words, generate an inverse index known as an IRindex, and use the IR index to produce answers to a user query. Theinformation access process 40 (of FIG. 2) leverages grammar it developsfor front end processing when building the IR index to generate phasedsynonyms (or phrased aliases) for the document. More specifically, theinformation access process 40 applies the parser and grammar rules tothe document before the IR index is built. The effect of this can bedescribed by way of example. One rule may indicate the entity “laptop”goes to “laptop” or “notebook.” Thus, during parsing, if “notebook” isfound, it will be replaced by the entity “laptop,” which then getsrolled into the IR index.

[0059] At search time, the information access process 40 attempts tofind documents containing the search terms of the user query, and inaddition, the incoming user search terms are run through the parser,that will find multiple entities, if they exist, of the same term. Thus,combining the parser and the grammar rules, the information accessprocess 40 maps a user query into its canonical form of referring to theitem.

[0060] The information retrieval process 40 may also process a grammarand generate a grammar index, which can help find other phrased synonymsthat other methods might not find. For example, “Xeon”, an IntelMicroprocessor whose full designation is the “Intel Pentium XeonProcessor,” may be represented in canonical form as “Intel XeonProcessor.” If a user query is received for “Intel,” “Xeon” would not befound without the grammar index of the information access process 40.The information access process 40 will search the grammar index andproduce a list of all grammar tokens containing “Intel,” and add thislist to the overall search so that the results would pick up “Xeon,”among others.

[0061] The use of the parser and grammar rules to specify the expansionof a full user query to include synonyms allows for centralization oflinguistic knowledge within the grammar rules, removing a need foradditional manual configuration to gain the query expansionfunctionality.

[0062] Referring to FIG. 10, a query expansion process 250 includesnormalizing 252 and parsing 254 the punitive text. The canonicalnon-terminal representations are inserted 256 into an IR index in placeof the actual punitive text.

[0063] In an embodiment, the punitive text is used “as-is.” However,when a user requests a search, the punitive search phrase is processedaccording to the grammar rules to obtain a canonical non-terminalrepresentation. The grammar rules are then used in a generative mannerto determine which other possible phrases could have generated the samecanonical non-terminal representation. Those phrases are stored in theIR index.

[0064] The “as-is” method described above is generally slower and lesscomplete in query expansion coverage, because it may take too long togenerate all possible phrases that reduce to the same canonicalnon-terminal representation, so a truncation of the possible phrase listcan occur. However, the “as-is” method has the advantage of notrequiring re-indexing the original text whenever the grammar rules areupdated.

[0065] In a particular embodiment, the information access process 40 (ofFIG. 2) combines an IR index search with a main server database searchto respond to queries that involve a combination of structured featuresstored in a database (e.g., price, color) and unstructured informationexisting in free text. Structured Query Language (SQL) is used tointerface to a standard relational database management system (RDBMS).To jointly search an RDBMS and an IR index, the information accessprocess 40 issues an unstructured search request to the IR index, usesthe results, and Issues a SQL query that includes a restriction to thoseinitial IR index search results. However, the free text information inthe IR index may not always correspond to individual records in theRDBMS. In general, there may be many items in the IR index thatcorrespond to categories of items in the RDBMS. In order to improve theefficiency of searches involving such items in the IR index, the IRindex is further augmented with category hierarchy information. Thus, amatch to an item in the IR index will also retrieve correspondingcategory hierarchy information, which can then be mapped to multipleitems in the RDBMS.

[0066] The information access process 40 parser contains the capabilityof processing large and ambiguous grammar efficiently by using a graphrather than “pure” words. The parser allows the information accessprocess 40 to take the grammar file and an incoming query and determinethe query's structure. Generally, the parser pre-compiles the grammarinto a binary format. The parser then accepts a query as input text,processes the query, and outputs a graph.

[0067] LR parsing is currently one of the most popular parsingtechniques for context-free grammars. LR parsing is generally referredto as “bottom-up” because it tries to construct a parse tree for aninput string beginning at the leaves (the bottom) and working towardsthe root (top). The LR parser scans the input string from left to rightand constructs a right most derivation in reverse.

[0068] The information access process 40 improves on the LR parser byadding the ability to handle ambiguous grammars efficiently and bypermitting the system developer to include regular expressions on theright hand side of grammar rules. In the “standard” LP parser, anambiguous grammar would produce a conflict during the generation of LRtables. An ambiguous grammar is one that can interpret the same sequenceof words as two or more different parse trees. Regular expressions arecommonly used to represent patterns of alternative and/or optionalwords. For example, a regular expression “(a|b)c+” means one or moreoccurrences of the letter “c” following either the letter “a” or theletter “b.”

[0069] In traditional LR parsing, a state machine, typically representedas a set of states along with transitions between the states, is usedtogether with a last-in first-out (LIFO) stack. The state machine isdeterministic, that is, the top symbol on the stack combined with thecurrent state specifies conclusively what the next state should be.Ambiguity is not supported in traditional LR parsing because of thedeterministic nature of the state machine.

[0070] To support ambiguity the information access process 40 extendsthe LR parser to permit non-determinism in the state machine, that is,in any given state with any given top stack symbol, more than onesuccessor state is permitted. This non-determinism is supported in theinformation access process 40 with the use of a priority queue structurerepresenting multiple states under consideration by the parser. Apriority queue is a data structure that maintains a list of items sortedby a numeric score and permits efficient additions to and deletions fromthe queue. Because the parser used in the information access process 40is permitted to be simultaneously in multiple states, the parser tracksmultiple stacks, one associated with each current state. This may leadto inefficiency. However, since the multiple concurrent states tend tohave a natural “tree” structure, because typically one state transitionsto a new set of states through multiple putative transitions, themultiple stacks can be structured much more efficiently in memory usagevia a similar tree organization.

[0071] In a traditional LR parser, the state diagram can be very largeeven for moderate size grammars because the size of the state diagramtends to grow exponentially with the size of the grammar. This resultsin tremendous memory usage because grammars suitable for naturallanguage tend to be much larger than those for a machine programminglanguage. In order to improve the efficiency of the state diagrams, theinformation access process 40 makes use of empty transitions that areknown as “epsilon” transitions. The exponential increase in size occursbecause multiple parses may lead to a common rule in the grammar, but ina deterministic state diagram, because the state representing the commonrule needs to track which of numerous possible ancestors was used, thereneeds to be one state of each possible ancestor. However, because theinformation access process 40 has expanded the LR parser to supportambiguity via support for a non-deterministic state diagram, themultiple ancestors can be tracked via the previously described priorityqueue/stack tree mechanism. Thus, a common rule can be collapsed into asingle state in the non-deterministic state diagram rather thanreplicated multiple times. In general, performing this compression in anoptimal fashion is difficult. However, a large amount of compression canbe achieved by inserting an epsilon whenever the right-hand side of agrammar rule recourses into a non-terminal. This has the effect ofcausing all occurrences of the same non-terminal in differentright-hand-sides to be collapsed in the non-deterministic state diagram.A concern which the information access process 40 addresses is that any“left-recursion,” that is, a rule which eventually leads to itselfeither directly or after the application of other rules, will result ina set of states in the non-deterministic state diagram that can betraversed in a circular manner via epsilon transitions. This wouldresult in a potential infinite processing while parsing. In order toprevent infinite processing, if there are multiple possible epsilontransitions in series, they are reduced to a single epsilon transition.This may result in a small amount of inaccuracy in the parser, butavoids the potential for infinite processing.

[0072] The parser of the information access process 40 has also beenexpanded to support regular expressions on the right-hand-side ofcontext-free grammar rules. Regular expressions can always be expressedas context-free rules, but it is tedious for grammar developers toperform this manual expansion, increasing the effort required to authora grammar and the chance for human error. Implementation of thisextension would be to compile the regular expressions into context-freerules mechanically and integrate these rules into the larger set ofgrammar rules. Converting regular expressions into finite state automatathrough generally known techniques, and then letting a new non-terminalrepresent each state in the automata can accomplish this. However, thisapproach results in great inefficiency during parsing because of thelarge number of newly created states. Also, this expansion results inparse trees which no longer correspond to the original, unexpanded,grammar, hence, increasing the amount of effort required by the grammardeveloper to identify and correct errors during development.

[0073] An alternative used by the information access process 40 is tofollow the finite state automaton corresponding to a regular expressionduring the parsing as if it were part of the overall non-deterministicstate diagram. The difficulty that arises is that right-hand-sides ofgrammar rules may correspond to both regular expressions of terminal andnon-terminal symbols in the same rule. Thus, when the LR parser of theinformation access process 40 reaches a reduce decision, there is nolonger a good one-to-one correspondence between the stack symbols andthe terminal symbols recently processed. A technique needs to beimplemented in order to find the start of the right-hand side on thestack. However, because the parser uses epsilons to mark recursions toreduce the state diagram size, the epsilons also provide useful markersto indicate on the stack when non-terminals were pursued. With thisinformation, the LR parser of the information access process 40 is ableto match the stack symbols to the terminals in the input text beingparsed.

[0074] Another efficiency of the LR parser of the information accessprocess 40 involves the ability to support “hints” in the grammar.Because natural language grammars tend to have a large amount ofambiguity, and ambiguity tends to result in much lengthier parsingtimes. In order to keep the amount of parsing time manageable, stepsmust be taken to “prune” less promising putative parses. However,automatic scoring of parses for their “promise” is non-trivial. Thereexist probabilistic techniques, which require training data to learnprobabilities typically associated with each grammar rule. The LR parserof the information access process 40 uses a technique that does notrequire any training data. A grammar developer is allowed to insert“hints,” which are either markers in the grammar rules with associated“penalty costs” or “anchors.” The penalty costs permit the grammardeveloper to instruct the LR parser of the information access process 40to favor certain parses over others, allowing for pruning ofless-favored parses. Anchors indicate to the LR parser that all otherputative parses that have not reached an anchor should be eliminated.Anchors thus permit the grammar developer to specify that a given phrasehas a strong likelihood of being the correct parse (or interpretation),hence, all other parses are discarded.

[0075] Another concern with supporting ambiguous grammars is that thelarge number of parses consumes much memory to represent. The LR parserof the information access process 40 is modified to represent a list ofalternative parse trees in a graph structure. In the graphrepresentation, two or more parse trees that share common substructurewithin the parse tree are represented as a single structure within thegraph. The edges in the graph representation correspond to grammarrules. A given path through the graph represents a sequentialapplication of a series of grammar rules, hence, uniquely identifying aparse tree.

[0076] Once a graph representation of potential parses is generated, atthe end of parsing a frame representation of the relevant potentialparses is outputted. This is achieved via a two-step method. First, thegraph is converted into a series of output directives. The outputdirectives are specified within the grammar by the grammar developer.Second, frame generation occurs as instructed by the output directives.The first step is complicated by the support for regular expressionswithin the grammar rules because a node in the parse tree may correspondto the application of a regular expression consisting of non-terminals,which in turn corresponds to application of other grammar rules withassociated output directives. The identity of these non-terminals is notexplicitly stated in the parse tree. In order to discover theseidentities, during the first step, the process follows a procedure verysimilar to the previously described LR parser, but instead, because onealready has a parse tree, the parse tree is used to “guide” the searchcontrol strategy. Once the proper identities are discovered, thecorresponding output directives are sent to the second stage.

[0077] The Information interface 80 frequently needs to access multipletables in an RDBMS in order to fulfill a data request made by thecontrol logic of the information access process 40. It is unwieldy forthe system developer to specify rules on which tables need to beaccessed to retrieve the requested information. Instead, it is muchsimpler for the system developer to simply specify what information isavailable in which tables. Given this information, the informationinterface 80 finds the appropriate set of tables to access, andcorrelates information among the tables. The correlation is carried outby the information interface 80 (of FIG. 4) requesting a standard joinoperation in SQL.

[0078] In order to properly identify a set of tables and theirrespective join columns, the information interface 80 (of FIG. 4) viewsthe set of tables as nodes in a graph and the potential join columns asedges in a graph. Given this view, a standard minimum spanning tree(MST) algorithm may be applied. However, the input to the informationinterface 80 is a request based on features and not on tables. In orderto identify the tables and join columns, the information interface 80treats the set of tables as nodes in a graph and the set of join columnsas edges in the graph. A standard minimum spanning tree (MST) algorithmcan be applied. One problem is that the same feature may be representedin more than one table. Thus, there may be multiple sets of tables thatcan potentially provide the information requested. In order to identifythe optimal set of tables and join columns, the information interface 80must apply a MST algorithm to each possible set of tables. Because thenumber of possible sets can expand exponentially, this can be a verytime consuming process. The information interface 80 also has theability to make an approximation as follows. There is a subset, whichmay be zero, one, or more, of features, which are represented in onlyone table per feature. These tables therefore are a mandatory subset ofthe set of tables to be accessed. In the approximation, the informationinterface 80 first applies a MST algorithm to the mandatory subset, andthen expands the core subset so as to include all the requested tables.The expansion seeks to minimize the number of additional joins needed tocover each feature not covered by the mandatory subset.

[0079] Other embodiments are within the following claims.

What is claimed is:
 1. A computer-implemented method of generating prosein response to a query, comprising: generating a text frame from thequery; and processing the text frame in conjunction with grammar rulesto produce a prose rendition of the query.
 2. The computer-implementedmethod of claim 1 wherein the text frame comprises a data structure. 3.The computer-implemented method of claim 2 wherein the data structurecomprises rows, each of the rows having a key, the key identifyinginformation in each of the rows.
 4. The computer-implemented method ofclaim 3 wherein the data structure further comprises a plurality of datastructures.
 5. The computer-implemented method of claim 4 wherein thegrammar rules are natural language rules.
 6. The computer-implementedmethod of claim 4 wherein the grammar rules are English.
 7. Thecomputer-implemented method of claim 4 wherein the generating the textframe further comprises encapsulating the processed text frame in amarkup language.
 8. The computer-implemented method of claim 7 whereinthe markup language is XML.
 9. The computer-implemented method of claim7 wherein the markup language is HTML.
 10. The computer implementedmethod of claim 1 wherein the processing the text frame comprisesmatching the text frame to the grammar rules.
 11. A computer program,residing on a computer-readable medium, comprising instructions forcausing a computer to: generate a text frame from the query; and processthe text frame in conjunction with grammar rules to produce a proserendition of the query.